<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>站酷（ZCOOL） - 设计师互动平台 - 交流设计.分享快乐</title>
    <css file="__TPLCSS__/indexlayout.css"/>
    <css file="__TPLCSS__/group_manner.css"/>
    <css file="__TPLCSS__/zcoolstyle.css"/>
    <css file="__TPLCSS__/myhome.css"/>
    <css file="__TPLCSS__/base.css" />
    <css file='__TPLCSS__/my.css'/>

    <js file="__TPLJS__/jquery-1.8.1.min.js"/>
    <js file='__TPLJS__/izcool_left_js.js'/>

    <js file='__TPLJS__/util.js'/>
                
    <js file='__TPLJS__/facebox.js'/>
    <css file='__TPLCSS__/facebox.css'/>
    <css file='__TPLCSS__/validate.css'/>
    <css file='__TPLCSS__/log_reg.css'/>
    <script type="text/javascript">
        jQuery(document).ready(function($) {
           $('a[relbox*=facebox]').facebox()
        })
    </script>
</head>
<body>
<div id="top">
    <div class="header">
        <!--头部logo-->
        <ul class="header_u1">
            <a href="###" title='站酷' class="logo_index"></a>
        </ul>
        <ul class="header_u2">
            <li class="header_li">
                <p class="header_p1">
                   <?php
                   if(isset($_SESSION['username']) || isset($_COOKIE['username'])){
                    $_SESSION['login']=1;//如果session 或 cookie不为空显示用户信息
                   }else{
                   $_SESSION['login']=0;
                   }
                   if($_SESSION['login']==1){
                    ?>
                <p class="Header_p01">
                 <span id="status_logon"><a href="/u/564753" target="_blank" class="b">
                      <?php
                      echo empty($_COOKIE['username'])?$_SESSION['username']:(empty($_SESSION['username'])?$_COOKIE['username']:1);
                      ?>
                 </a>|
                     <a href="__APP__/useroperation/logout">退出</a>|
                     <a href="/my/">我的站酷</a>|<a href="/u/564753/" target="_blank">我的主页</a></span>
                <span id="msg_num">|<a href="http://www.zcool.com.cn/my/msg_inbox.do">短消息</a>|
                    <a href="http://www.zcool.com.cn/my/msg.do">通知</a>|
                    <a href="http://www.zcool.com.cn/my/my_gb.do">留言</a></span>
                </p>
                    <?php
                   }else{
                   ?>
                    <span class="Header_p01">
                    <span class="tinfo" style="margin: 0 5px;"></span><a href="#denglu" relbox="facebox">登录</a>|
                    <a href="__APP__/useroperation/register_show">注册</a>|
                    <a href="__APP__/useroperation/getpassword_show">忘记密码</a>
                   </span>
                   <js file="__TPLJS__/header_helloinfo.js"/>
                    <?php
                    }?>
                </p>
            </li>
            <div id="search">
                <ul class="search_left"></ul>
                <ul class="search_con">
                    <li class="search_s">
                        <select name="select" class='search_select'>
                            <option value="1">搜索全站</option>
                            <option value="2">搜索作品</option>
                            <option value="3">搜索酷友</option>
                            <option value="4">搜索经验</option>
                        </select>
                    </li>
                    <li class="search_i"><input type="text" name="search" class="search_input"/></li>
                    <li class="search_b"><input type="image" src='__TPLIMG__/search.gif' align="bottom" name="submit"/></li>
                    <li class="search_text">| <a href="###">站酷招聘搜索</a></li>
                </ul>
                <ul class="search_right"></ul>
            </div>
        </ul>
    </div>

    <div id='mainnva'>
        <ul class="solidblockmenu">
            <li><a href="__APP__" class="current" title='首页'>首页</a></li>
            <li><a href="__APP__/izcool" title='我的站酷'>我的站酷</a></li>
            <li><a href="###" title='原创作品'>原创作品</a></li>
            <li><a href="###" title='经验分享'>经验分享</a></li>
            <li><a href="###" title='设计素材'>设计素材</a></li>
            <li><a href="###" title='招聘'><font color='yellow'>招聘</font></a></li>
            <li><a href="###" title='设计活动'>设计活动</a></li>
            <li><a href="__APP__/group" title='小组'>小组</a></li>
        </ul>
    </div>
</div>
<!----------登陆-------------->
<div id="denglu"style="display: none">
    <form method="post" id='header_login' onsubmit="return odlogin($(this))">
    <table width="80%" border="0" align="center" cellpadding="4" cellspacing="4">
        <tbody><tr>
            <td width="99" class="h2  b">用户名：</td>
            <td width="268">
                <input type="text" id="t_loginname" name="t_loginname" maxlength="30" onkeyup="check_null($(this))" elog='用户名不能为空' class="text-top-login"/>
            </td>
        </tr>
        <tr style="height: 20px;margin:5px 0;">
            <td class="h2  b">密码：</td>
            <td>
                <input type="password" id="t_password" name="t_password" maxlength="30" onkeyup="check_null($(this))" elog='密码不能为空'class="text-top-login"/>
            </td>
        </tr>
        <tr style="height: 20px;margin:5px 0;">
            <td colspan="2">
                <input type="checkbox" value="1" name="t_auto" id="t_auto">自动登录
                <input type="submit" value=" 登 录 "/>
            </td>
        </tr>
        <tr class="logon_error" style="display:none">
            <td colspan="2" style="color: red;">用户名和密码都要填写</td>
        </tr>

        </tbody>
     </table>
    </form>
    <script type="text/javascript">
        function check_null(val){
            if(val.val()==''){
                $('.logon_error').show().html("<td colspan='2' style='color:red'>"+val.attr('elog')+"</td>")
            }else{
                $('.logon_error').hide()
            }
        }
        function odlogin(obj){
            var data=$(obj).serialize();
            $.ajax({
                type:'post',
                url:"__APP__/useroperation/ajaxlogin",
                data:data,
                success:function(data){
                    var str='';
                    str+='<a href="/u/564753" target="_blank" class="b">'+data+'</a>|'
                    str+='<a href="__APP__/useroperation/logout">退出</a>|'
                    str+='<a href="/my/">我的站酷</a>|<a href="/u/564753/" target="_blank">我的主页</a></span>'
                    str+='<span id="msg_num">|<a href="http://www.zcool.com.cn/my/msg_inbox.do">短消息</a>|'
                    str+='<a href="http://www.zcool.com.cn/my/msg.do">通知</a>|'
                    str+='<a href="http://www.zcool.com.cn/my/my_gb.do">留言</a></span>'
                    if(data!=0){
                        //$('.Header_p01').fadeOut();
                        $('.Header_p01').fadeIn('1000');
                        $('.Header_p01').html(str);$('#facebox,.login').hide(600)
                    }
                    else{
                        $('.logon_error').show().html('<td colspan="2" style="color:red">用户名密码错误</td>');
                    }
                }
            })
            return false;
        }
    </script>
</div>